public class LC_226 {
    public LC_144.TreeNode invertTree(LC_144.TreeNode root) {
        if(root == null)return root;

        invertTree(root.left);
        invertTree(root.right);
        swap(root);
        return root;
    }
    private void swap(LC_144.TreeNode root){
        LC_144.TreeNode node = root.left;
        root.left = root.right;
        root.right = node;
    }
}
